/*
* @File Name steppers.h
* @File Path M:\MAS2\PRM_Robotic_Arm\PRMCcode\coding\trajectory\stepper\steppers.h
* @Author: Ruige_Lee
* @Date:   2019-04-22 17:09:51
* @Last Modified by:   Ruige_Lee
* @Last Modified time: 2019-05-10 16:28:47
* @Email: 295054118@whut.edu.cn
* @page: https://whutddk.github.io/
*//*
* @File Name steppers.h
* @File Path M:\MAS2\PRM_Robotic_Arm\PRMCcode\coding\trajectory\stepper\steppers.h
* @Author: Ruige_Lee
* @Date:   2019-04-17 14:23:36
* @Last Modified by:   Ruige_Lee
* @Last Modified time: 2019-04-22 12:08:02
* @Email: 295054118@whut.edu.cn"
*/



#ifndef _STEPPERS_H_
#define _STEPPERS_H_

#include <stdint.h>

#include "stepperDriver/steppersIP.h"

#define STEPPER_FIFO_DP 5000


extern const uint32_t posDiv[6];
extern const uint32_t posInit[6];
extern const uint32_t posMin[6];
extern const uint32_t posMax[6];




extern int16_t stepperFIFO[2][STEPPER_FIFO_DP][6];

extern uint16_t FIFO_read_prt[2];
extern uint16_t FIFO_write_prt[2];
extern uint8_t FIFO_full[2];
extern uint8_t FIFO_empty[2];


extern int32_t stepper_initialize();
extern int32_t stepper_enable( uint8_t robot );
extern int32_t stepper_disable( uint8_t robot );
extern int32_t stepper_PowerUp( uint8_t robot );
extern int32_t stepper_PowerDown( uint8_t robot);
extern float stepper_getRad( uint8_t robot, uint8_t axis );
extern int32_t stepper_rad2Pluse( uint8_t axis, float rad );
extern int32_t stepper_fifoPush(uint8_t robot,int16_t* robotConfig);
extern void stepper_handler( void );


#endif

